import numpy as np

cur_weight = 50
add_per_year = 1.2
fur_years = 10
while fur_years:
    cur_weight = cur_weight + add_per_year
    fur_years = fur_years - 1
    print("未来 %d 年的体重是：%f" % (10 - fur_years, cur_weight))

age_list = [a for a in range(1, 29)]
print(age_list)
fruits = ['李子', '香蕉', '苹果', '西瓜', '桃子']
for i in range(1, len(fruits) + 1):
    print("{}. {}".format(i, fruits[i - 1]))

for i in range(1, 10):
    for j in range(1, 10):
        if j >= i:
            print('aa', end="")
    print()

players = [['James', 202], ['Curry', 193], ['Durant', 205], ['Jordan', 199], ['David', 211]]
while players:
    player = players.pop()
    if player[1] > 200:
        print(player)
answer = np.random.randint(10, 50)  # 正确的数字
# guess=0   # 设定所猜数字初始值
guess = answer
guess_time = 0  # 猜测次数
while guess != answer:
    guess = int(input('请猜10-50之间的数字：'))
    guess_time = guess_time + 1
    if guess > answer:
        print('请猜小一点')
    elif guess < answer:
        print('请猜大一点')
    else:
        print('恭喜答对了，正确答案是：%d,你一共猜了%d次' % (guess, guess_time))
        print(answer)

players2 = ['John', 'Peter', 'Ivan', 'Kevin', 'Jodan']
teams = ['Michael', 'Peter', 'Curry', 'Kevin', 'Jodan']

newteam = players2[:]
players2.append('gong')
print(id(players2), players2, id(newteam), newteam)
for i in teams:
    if i not in newteam:
        newteam.append(i)
print(newteam)
